openUri

open fun openUri(uri: String, initializeplayerState: <Error class: unknown class>)

Opens a media source from the given URI.

IMPORTANT: iOS AVPlayer has a tendency to auto-play when certain properties are set. To ensure proper behavior with InitialPlayerState.PAUSE, we need to:

  1. Explicitly call pause() on the player

  2. Set rate to 0

  3. Not set rate during initialization

  4. Update all relevant state variables

Parameters

uri

The URI of the media to open

initializeplayerState

Controls whether playback should start automatically after opening